#include<bits/stdc++.h>

using namespace std;

void str2int(char a[], int n) {
    //scanf("%d",&n);
    n = 0;
    for (int i = 0; i < strlen(a); i++) {
        n = n * 10 + a[i] - '0';
    }


}

int main() {
    char a[100] = "123456";
    int n;
    str2int(a, n);
    cout << n << endl;
    return 0;
}
